package com.yxt.qmgf.minesweeper.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yxt.qmgf.userinfo.vo.UserInfoVO;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@JsonIgnoreProperties(ignoreUnknown = true)
public class mineScore {
    private String username;       // 用户名
    private int scores; //游戏积分
    private String score; //账户积分
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")// 得分
    private LocalDateTime dateTime; // 游戏时间

    public mineScore() {}

    // 构造方法、getter和setter
    public mineScore(String username, int scores, LocalDateTime dateTime,String score) {
        this.username = username;
        this.scores = scores;
        this.dateTime = dateTime;
        this.score = score;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getScores() {
        return scores;
    }

    public void setScores(int scores) {
        this.scores = scores;
    }

    public LocalDateTime getDateTime() {
        return dateTime;
    }

    public void setDateTime(LocalDateTime dateTime) {
        this.dateTime = dateTime;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public String getFormattedDate() {
        return dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
    }

}
